Page({
  data: {
    question: ''
  },
  inputQuestion(e) {
    this.setData({
      question: e.detail.value
    });
  },
  submitQuestion() {
    const { question } = this.data;
    if (question) {
      wx.showToast({
        title: '问题提交成功，我们会尽快处理',
        icon: 'success',
        duration: 2000
      });
      // 清空输入框
      this.setData({
        question: ''
      });
    } else {
      wx.showToast({
        title: '请输入问题',
        icon: 'none',
        duration: 2000
      });
    }
  }
});    